#include "quicksortclass.h"

#include <iostream>
#include <vector>
#include <algorithm>
#include <QElapsedTimer>
QuickSortClass::QuickSortClass(QObject* parent) : QObject{ parent }
{
}

void QuickSortClass::sort(std::vector<int> theData)
{
    QElapsedTimer timer;
    timer.start();
    std::sort(theData.begin(), theData.end());
    int millsecond = timer.elapsed();
    std::cout << "快速排序用时" << millsecond << "毫秒" << std::endl;
    emit sortResult(theData);
}




